import pandas as pd
import numpy as np

# 定义df1
df1 = pd.DataFrame({
    'alpha': ['A', 'B', 'B', 'C', 'D', 'E'],
    'beta': ['a', 'a', 'b', 'c', 'c', 'e'],
    'feature1': [1, 1, 2, 3, 3, 1],
    'feature2': ['low', 'medium', 'medium', 'high', 'low', 'high']
})

# 定义df2
df2 = pd.DataFrame({
    'alpha': ['A', 'A', 'B', 'F'],
    'beta': ['d', 'd', 'b', 'f'],
    'pazham': ['apple', 'orange', 'pine', 'pear'],
    'kilo': ['high', 'low', 'high', 'medium'],
    'price': np.array([5, 6, 5, 7])
})

# 基于共同列alpha和beta的内连接
df_merged = pd.merge(df1, df2, on=['alpha', 'beta'], how='inner')

# 显示结果
print(df_merged)